<?php
	class hopdongtindungbs
	{
		// Các trường
		public $SoKheUoc = "";
		public $SoHDTC = "";
		public $QuanHeVoiKH = "";
		public $SoThangVay = 0;
		public $LaiSuatQuaHan = 0;		
		public $SoTienVay = 0;
		public $MucDichChoVay = "";
		public $NgayLapHopDong = "";
		public $NgayDenHan = "";
		public $HinhThucXuLy = "";
		public $MaKyHanTra = 0;

		// Các phương thức
		public function Them()
		{
			$db = new hopdongtindungdb();
			return $db->Them(
							 $this->SoKheUoc, 
						     $this->SoHDTC,
							$this->QuanHeVoiKH,
							$this->SoThangVay,
							$this->LaiSuatQuaHan,
							 $this->SoTienVay,
						     $this->MucDichChoVay,
							 $this->NgayLapHopDong,
							 $this->NgayDenHan,
							 $this->HinhThucXuLy,
							 $this->MaKyHanTra);
		}
		
		public function ThemHopDongTinDung()
		{
			$db = new hopdongtindungdb();
			return $db->ThemHopDongTinDung(
					$this->SoKheUoc,
					$this->SoHDTC,
					$this->QuanHeVoiKH,
					$this->SoThangVay,
					$this->LaiSuatQuaHan,	
					$this->SoTienVay,
					$this->MucDichChoVay,
					$this->NgayLapHopDong,
					$this->NgayDenHan,
					$this->HinhThucXuLy,
					$this->MaKyHanTra);
		}
		
		public function CapNhat()
		{
			$db = new hopdongtindungdb();
			return $db->CapNhat($this->SoKheUoc, 
						     $this->SoHDTC,
							$this->QuanHeVoiKH,
							$this->SoThangVay,		
							$this->LaiSuatQuaHan,
							 $this->SoTienVay,
						     $this->MucDichChoVay,
							 $this->NgayLapHopDong,
							 $this->NgayDenHan,
							 $this->HinhThucXuLy,
							 $this->MaKyHanTra);
		}
		
		public function LayDanhSach()
		{
			$db = new hopdongtindungdb();
			return $db->LayDanhSach($this->SoKheUoc, 
						     		$this->SoHDTC,
									$this->QuanHeVoiKH,
									$this->SoThangVay,
									$this->LaiSuatQuaHan,
							 		$this->SoTienVay,
						     		$this->MucDichChoVay,
							 		$this->NgayLapHopDong,
							 		$this->NgayDenHan,
							 		$this->HinhThucXuLy,
							 		$this->MaKyHanTra);
		}
	}
?>